package com.hexinfo.dmpro.sparing.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 每个表的hdfs相关信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TableHandDTO {

    //源库名
    private String dbNameSou;
    //源表名
    private String tbNameSou;
    //源sql条件
    private String QueryCriteriaSou;
    //目标库
    private String dbNameTar;
    //目标表
    private String tbNameTar;
    //目标sql条件
    private String QueryCriteriaTar;
    //每个表的hdfs路径
    private List<HdfsDistcpDTO> hdfsDistcpDTOS;
    //消息中心id
    private String id;
    //日志文件名
    private String fileName;
    //开始时间(yyyy-MM-dd)
    private String startDate;
    //结束时间(yyyy-MM-dd)
    private String endDate;

    //源库.表
    public String getSouDbTbName(){
        return dbNameSou + "." + tbNameSou;
    }

    //目标库.表
    public String getTarDbTbName(){
        return dbNameTar + "." + tbNameTar;
    }

}
